<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <p:panelGrid columns="1">
            
            <h:panelGroup>
                <p:graphicImage id="img" value="IMG/photo1.jpg" />
                <p:resizable for="img" />
            </h:panelGroup>
            
            <h:panelGroup>
                <h:inputTextarea value="Normal textarea here..." />
                <h:inputTextarea id="area" value="Resize me if you need more space..." />
                <p:resizable for="area" animate="true" effect="swing" effectDuration="normal">
                    <p:ajax listener="#{resizeBean.handleResize}" />
                </p:resizable>
            </h:panelGroup>
            
        </p:panelGrid>
    </h:body>
</html>
